<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Qwt User&#39;s Guide: qwt_plot_zoomer.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Qwt User&#39;s Guide
   &#160;<span id="projectnumber">6.2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('qwt__plot__zoomer_8cpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">qwt_plot_zoomer.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/******************************************************************************</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Qwt Widget Library</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * Copyright (C) 1997   Josef Wilgen</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Copyright (C) 2002   Uwe Rathmann</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * This library is free software; you can redistribute it and/or</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * modify it under the terms of the Qwt License, Version 1.0</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *****************************************************************************/</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160; </div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;qwt_plot_zoomer.h&quot;</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &quot;qwt_plot.h&quot;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &quot;qwt_scale_div.h&quot;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;qwt_scale_map.h&quot;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &quot;qwt_interval.h&quot;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &quot;qwt_picker_machine.h&quot;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160; </div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &lt;qstack.h&gt;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="keyword">static</span> <a class="code" href="class_qwt_interval.html">QwtInterval</a> qwtExpandedZoomInterval( <span class="keywordtype">double</span> v1, <span class="keywordtype">double</span> v2,</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    <span class="keywordtype">double</span> minRange, <span class="keyword">const</span> <a class="code" href="class_qwt_transform.html">QwtTransform</a>* transform )</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;{</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    <span class="keywordtype">double</span> min = v1;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    <span class="keywordtype">double</span> max = v2;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <span class="keywordflow">if</span> ( max - min &lt; minRange )</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    {</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;        min = 0.5 * ( min + max - minRange );</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        max = min + minRange;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        <span class="keywordflow">if</span> ( transform )</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;        {</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;            <span class="comment">// f.e the logarithmic scale doesn&#39;t allow values</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;            <span class="comment">// outside [QwtLogTransform::LogMin/QwtLogTransform::LogMax]</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160; </div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;            <span class="keywordtype">double</span> minBounded = transform-&gt;<a class="code" href="class_qwt_transform.html#aef97acf17f900905f2a93cec7f61e643">bounded</a>( min );</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;            <span class="keywordtype">double</span> maxBounded = transform-&gt;<a class="code" href="class_qwt_transform.html#aef97acf17f900905f2a93cec7f61e643">bounded</a>( max );</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;            <span class="keywordflow">if</span> ( minBounded != min )</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;            {</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;                maxBounded = transform-&gt;<a class="code" href="class_qwt_transform.html#aef97acf17f900905f2a93cec7f61e643">bounded</a>( minBounded + minRange );</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;            }</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( maxBounded != max )</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;            {</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;                minBounded = transform-&gt;<a class="code" href="class_qwt_transform.html#aef97acf17f900905f2a93cec7f61e643">bounded</a>( maxBounded - minRange );</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;            }</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160; </div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;            min = minBounded;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;            max = maxBounded;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        }</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    }</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160; </div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_qwt_interval.html">QwtInterval</a>( min, max );</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;}</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="keyword">static</span> QRectF qwtExpandedZoomRect( <span class="keyword">const</span> QRectF&amp; zoomRect, <span class="keyword">const</span> QSizeF&amp; minSize,</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keyword">const</span> <a class="code" href="class_qwt_transform.html">QwtTransform</a>* transformX, <span class="keyword">const</span> <a class="code" href="class_qwt_transform.html">QwtTransform</a>* transformY )</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;{</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    QRectF r = zoomRect;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160; </div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordflow">if</span> ( minSize.width() &gt; r.width() )</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    {</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        <span class="keyword">const</span> <a class="code" href="class_qwt_interval.html">QwtInterval</a> intv = qwtExpandedZoomInterval(</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;            r.left(), r.right(), minSize.width(), transformX );</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160; </div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        r.setLeft( intv.<a class="code" href="class_qwt_interval.html#a0df143a36d76a677976d82987cab8a06">minValue</a>() );</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        r.setRight( intv.<a class="code" href="class_qwt_interval.html#a44820fa5d6e6cefa59dc31ea0d522d61">maxValue</a>() );</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    }</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <span class="keywordflow">if</span> ( minSize.height() &gt; r.height() )</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    {</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        <span class="keyword">const</span> <a class="code" href="class_qwt_interval.html">QwtInterval</a> intv = qwtExpandedZoomInterval(</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;            zoomRect.top(), zoomRect.bottom(), minSize.height(), transformY );</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        r.setTop( intv.<a class="code" href="class_qwt_interval.html#a0df143a36d76a677976d82987cab8a06">minValue</a>() );</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        r.setBottom( intv.<a class="code" href="class_qwt_interval.html#a44820fa5d6e6cefa59dc31ea0d522d61">maxValue</a>() );</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    }</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160; </div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    <span class="keywordflow">return</span> r;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;}</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="keyword">class </span>QwtPlotZoomer::PrivateData</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;{</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;  <span class="keyword">public</span>:</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    uint <a class="code" href="class_qwt_plot_zoomer.html#ab2a8af282a7052976e9c18b2d0c59db9">zoomRectIndex</a>;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <a class="code" href="class_q_stack.html">QStack&lt; QRectF &gt;</a> <a class="code" href="class_qwt_plot_zoomer.html#a139406bf61ed7f32a4c114e1ae4affff">zoomStack</a>;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160; </div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="class_qwt_plot_zoomer.html#ab541148fa7d57b8102d3d70ab9daccc4">maxStackDepth</a>;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;};</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#a1f77745e104b4a6300ebf1c6c3412b7e">  109</a></span>&#160;<a class="code" href="class_qwt_plot_zoomer.html#a1f77745e104b4a6300ebf1c6c3412b7e">QwtPlotZoomer::QwtPlotZoomer</a>( QWidget* canvas, <span class="keywordtype">bool</span> doReplot )</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    : <a class="code" href="class_qwt_plot_picker.html">QwtPlotPicker</a>( canvas )</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;{</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <span class="keywordflow">if</span> ( <a class="code" href="class_qwt_plot_picker.html#ad2a03a80f35826ed6256f039da2b4bf2">canvas</a> )</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        init( doReplot );</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;}</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160; </div>
<div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#abfb68c623cf2d6e92f4248186541fed7">  133</a></span>&#160;<a class="code" href="class_qwt_plot_zoomer.html#a1f77745e104b4a6300ebf1c6c3412b7e">QwtPlotZoomer::QwtPlotZoomer</a>( QwtAxisId xAxisId, QwtAxisId yAxisId,</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        QWidget* canvas, <span class="keywordtype">bool</span> doReplot )</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    : <a class="code" href="class_qwt_plot_picker.html">QwtPlotPicker</a>( xAxisId, yAxisId, canvas )</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;{</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    <span class="keywordflow">if</span> ( <a class="code" href="class_qwt_plot_picker.html#ad2a03a80f35826ed6256f039da2b4bf2">canvas</a> )</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        init( doReplot );</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;}</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160; </div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;<span class="keywordtype">void</span> QwtPlotZoomer::init( <span class="keywordtype">bool</span> doReplot )</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;{</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    m_data = <span class="keyword">new</span> PrivateData;</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160; </div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    m_data-&gt;maxStackDepth = -1;</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160; </div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    <a class="code" href="class_qwt_picker.html#a94fc60c7223cdc470ae63156f6446d6f">setTrackerMode</a>( <a class="code" href="class_qwt_picker.html#a01be4d404ffc3a7b238b0d0aaeb66b93a973f3446b39ea41b5dc3b31593ecb64a">ActiveOnly</a> );</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <a class="code" href="class_qwt_picker.html#a83096bad2662e02e4914a7b40241c351">setRubberBand</a>( <a class="code" href="class_qwt_picker.html#ab36c79d8ff20aba5b778d2823c1f7894ae4dc32fb99b4fe2058bb594ab5e8c70a">RectRubberBand</a> );</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    <a class="code" href="class_qwt_picker.html#a5ff72a5658631bcad3857ca5cfd3e6d9">setStateMachine</a>( <span class="keyword">new</span> <a class="code" href="class_qwt_picker_drag_rect_machine.html">QwtPickerDragRectMachine</a>() );</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160; </div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <span class="keywordflow">if</span> ( doReplot &amp;&amp; <a class="code" href="class_qwt_plot_picker.html#ac5906d5fe7543f3db7808da44d8197a9">plot</a>() )</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        <a class="code" href="class_qwt_plot_picker.html#ac5906d5fe7543f3db7808da44d8197a9">plot</a>()-&gt;<a class="code" href="class_qwt_plot.html#a7b094e29b8e92b00e36517d0d7633c4b">replot</a>();</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160; </div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <a class="code" href="class_qwt_plot_zoomer.html#a7ee4f2a0606df6e85258c52f0b5c7bc2">setZoomBase</a>( <a class="code" href="class_qwt_plot_picker.html#ac15a71b19aca88fa850298975ec18eee">scaleRect</a>() );</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;}</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160; </div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;QwtPlotZoomer::~QwtPlotZoomer()</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;{</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    <span class="keyword">delete</span> m_data;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;}</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160; </div>
<div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#a3965591944793790407ba91d6de3a882">  174</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_zoomer.html#a3965591944793790407ba91d6de3a882">QwtPlotZoomer::setMaxStackDepth</a>( <span class="keywordtype">int</span> depth )</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;{</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    m_data-&gt;maxStackDepth = depth;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160; </div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    <span class="keywordflow">if</span> ( depth &gt;= 0 )</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    {</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;        <span class="comment">// unzoom if the current depth is below m_data-&gt;maxStackDepth</span></div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160; </div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">int</span> zoomOut =</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;            m_data-&gt;zoomStack.count() - 1 - depth; <span class="comment">// -1 for the zoom base</span></div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160; </div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        <span class="keywordflow">if</span> ( zoomOut &gt; 0 )</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;        {</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;            <a class="code" href="class_qwt_plot_zoomer.html#afe9f123f263536b620d1a9061d5705c6">zoom</a>( -zoomOut );</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;            <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = m_data-&gt;zoomStack.count() - 1;</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;                i &gt; <span class="keywordtype">int</span>( m_data-&gt;zoomRectIndex ); i-- )</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;            {</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;                ( void )m_data-&gt;zoomStack.pop(); <span class="comment">// remove trailing rects</span></div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;            }</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;        }</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    }</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;}</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160; </div>
<div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#ab541148fa7d57b8102d3d70ab9daccc4">  201</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="class_qwt_plot_zoomer.html#ab541148fa7d57b8102d3d70ab9daccc4">QwtPlotZoomer::maxStackDepth</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    <span class="keywordflow">return</span> m_data-&gt;maxStackDepth;</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;}</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160; </div>
<div class="line"><a name="l00212"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#a139406bf61ed7f32a4c114e1ae4affff">  212</a></span>&#160;<span class="keyword">const</span> <a class="code" href="class_q_stack.html">QStack&lt; QRectF &gt;</a>&amp; <a class="code" href="class_qwt_plot_zoomer.html#a139406bf61ed7f32a4c114e1ae4affff">QwtPlotZoomer::zoomStack</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    <span class="keywordflow">return</span> m_data-&gt;zoomStack;</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;}</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160; </div>
<div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#aa1e519a50f33f00f612e413cae3c0acc">  221</a></span>&#160;QRectF <a class="code" href="class_qwt_plot_zoomer.html#aa1e519a50f33f00f612e413cae3c0acc">QwtPlotZoomer::zoomBase</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    <span class="keywordflow">return</span> m_data-&gt;zoomStack[0];</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;}</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160; </div>
<div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#a7ee4f2a0606df6e85258c52f0b5c7bc2">  235</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_zoomer.html#a7ee4f2a0606df6e85258c52f0b5c7bc2">QwtPlotZoomer::setZoomBase</a>( <span class="keywordtype">bool</span> doReplot )</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;{</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    <a class="code" href="class_qwt_plot.html">QwtPlot</a>* plt = <a class="code" href="class_qwt_plot_picker.html#ac5906d5fe7543f3db7808da44d8197a9">plot</a>();</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    <span class="keywordflow">if</span> ( plt == NULL )</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160; </div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    <span class="keywordflow">if</span> ( doReplot )</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;        plt-&gt;<a class="code" href="class_qwt_plot.html#a7b094e29b8e92b00e36517d0d7633c4b">replot</a>();</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160; </div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;    m_data-&gt;zoomStack.clear();</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    m_data-&gt;zoomStack.push( <a class="code" href="class_qwt_plot_picker.html#ac15a71b19aca88fa850298975ec18eee">scaleRect</a>() );</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;    m_data-&gt;zoomRectIndex = 0;</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160; </div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;    <a class="code" href="class_qwt_plot_zoomer.html#a0d0f90bbd5fe99d5231b3cee00fffabe">rescale</a>();</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;}</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160; </div>
<div class="line"><a name="l00261"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#a4376cd882cf72e1794cbbe7264ee96fb">  261</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_zoomer.html#a7ee4f2a0606df6e85258c52f0b5c7bc2">QwtPlotZoomer::setZoomBase</a>( <span class="keyword">const</span> QRectF&amp; base )</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;{</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;    <span class="keyword">const</span> <a class="code" href="class_qwt_plot.html">QwtPlot</a>* plt = <a class="code" href="class_qwt_plot_picker.html#ac5906d5fe7543f3db7808da44d8197a9">plot</a>();</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;    <span class="keywordflow">if</span> ( !plt )</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160; </div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;    <span class="keyword">const</span> QRectF sRect = <a class="code" href="class_qwt_plot_picker.html#ac15a71b19aca88fa850298975ec18eee">scaleRect</a>();</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;    <span class="keyword">const</span> QRectF bRect = base | sRect;</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160; </div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;    m_data-&gt;zoomStack.clear();</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;    m_data-&gt;zoomStack.push( bRect );</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;    m_data-&gt;zoomRectIndex = 0;</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160; </div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    <span class="keywordflow">if</span> ( base != sRect )</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;    {</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;        m_data-&gt;zoomStack.push( sRect );</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;        m_data-&gt;zoomRectIndex++;</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;    }</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160; </div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;    <a class="code" href="class_qwt_plot_zoomer.html#a0d0f90bbd5fe99d5231b3cee00fffabe">rescale</a>();</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;}</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160; </div>
<div class="line"><a name="l00287"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">  287</a></span>&#160;QRectF <a class="code" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">QwtPlotZoomer::zoomRect</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;    <span class="keywordflow">return</span> m_data-&gt;zoomStack[m_data-&gt;zoomRectIndex];</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;}</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160; </div>
<div class="line"><a name="l00295"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#ab2a8af282a7052976e9c18b2d0c59db9">  295</a></span>&#160;uint <a class="code" href="class_qwt_plot_zoomer.html#ab2a8af282a7052976e9c18b2d0c59db9">QwtPlotZoomer::zoomRectIndex</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;    <span class="keywordflow">return</span> m_data-&gt;zoomRectIndex;</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;}</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160; </div>
<div class="line"><a name="l00310"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#afe9f123f263536b620d1a9061d5705c6">  310</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_zoomer.html#afe9f123f263536b620d1a9061d5705c6">QwtPlotZoomer::zoom</a>( <span class="keyword">const</span> QRectF&amp; rect )</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;{</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;    <span class="keywordflow">if</span> ( m_data-&gt;maxStackDepth &gt;= 0 &amp;&amp;</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;        <span class="keywordtype">int</span>( m_data-&gt;zoomRectIndex ) &gt;= m_data-&gt;maxStackDepth )</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;    {</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;    }</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160; </div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;    <span class="keyword">const</span> QRectF <a class="code" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">zoomRect</a> = rect.normalized();</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;    <span class="keywordflow">if</span> ( <a class="code" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">zoomRect</a> != m_data-&gt;zoomStack[m_data-&gt;zoomRectIndex] )</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;    {</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;        <span class="keywordflow">for</span> ( uint i = m_data-&gt;zoomStack.count() - 1;</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;            i &gt; m_data-&gt;zoomRectIndex; i-- )</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;        {</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;            ( void )m_data-&gt;zoomStack.pop();</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;        }</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160; </div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;        m_data-&gt;zoomStack.push( <a class="code" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">zoomRect</a> );</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;        m_data-&gt;zoomRectIndex++;</div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160; </div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;        <a class="code" href="class_qwt_plot_zoomer.html#a0d0f90bbd5fe99d5231b3cee00fffabe">rescale</a>();</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160; </div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;        Q_EMIT <a class="code" href="class_qwt_plot_zoomer.html#af5d312de34b493b59e48f03850478648">zoomed</a>( <a class="code" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">zoomRect</a> );</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;    }</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;}</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160; </div>
<div class="line"><a name="l00347"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#a50d440b3b84c2d2accc2e791c1d985ea">  347</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_zoomer.html#afe9f123f263536b620d1a9061d5705c6">QwtPlotZoomer::zoom</a>( <span class="keywordtype">int</span> offset )</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;{</div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;    <span class="keywordtype">int</span> newIndex;</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160; </div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;    <span class="keywordflow">if</span> ( offset == 0 )</div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;    {</div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;        newIndex = 0;</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;    }</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;    {</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;        newIndex = m_data-&gt;zoomRectIndex + offset;</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;        newIndex = qBound( 0, newIndex, m_data-&gt;zoomStack.count() - 1 );</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;    }</div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160; </div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;    <span class="keywordflow">if</span> ( newIndex != <span class="keyword">static_cast&lt;</span> <span class="keywordtype">int</span> <span class="keyword">&gt;</span>( m_data-&gt;zoomRectIndex ) )</div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;    {</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;        m_data-&gt;zoomRectIndex = newIndex;</div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;        <a class="code" href="class_qwt_plot_zoomer.html#a0d0f90bbd5fe99d5231b3cee00fffabe">rescale</a>();</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;        Q_EMIT <a class="code" href="class_qwt_plot_zoomer.html#af5d312de34b493b59e48f03850478648">zoomed</a>( <a class="code" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">zoomRect</a>() );</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;    }</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;}</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160; </div>
<div class="line"><a name="l00383"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#afc12a6e757768a71d1c74b90931bfc70">  383</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_zoomer.html#afc12a6e757768a71d1c74b90931bfc70">QwtPlotZoomer::setZoomStack</a>(</div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;    <span class="keyword">const</span> <a class="code" href="class_q_stack.html">QStack&lt; QRectF &gt;</a>&amp; zoomStack, <span class="keywordtype">int</span> zoomRectIndex )</div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;{</div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;    <span class="keywordflow">if</span> ( <a class="code" href="class_qwt_plot_zoomer.html#a139406bf61ed7f32a4c114e1ae4affff">zoomStack</a>.isEmpty() )</div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160; </div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;    <span class="keywordflow">if</span> ( m_data-&gt;maxStackDepth &gt;= 0 &amp;&amp;</div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;        <a class="code" href="class_qwt_plot_zoomer.html#a139406bf61ed7f32a4c114e1ae4affff">zoomStack</a>.count() &gt; m_data-&gt;maxStackDepth )</div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;    {</div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;    }</div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160; </div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;    <span class="keywordflow">if</span> ( zoomRectIndex &lt; 0 || zoomRectIndex &gt; <a class="code" href="class_qwt_plot_zoomer.html#a139406bf61ed7f32a4c114e1ae4affff">zoomStack</a>.count() )</div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;        <a class="code" href="class_qwt_plot_zoomer.html#ab2a8af282a7052976e9c18b2d0c59db9">zoomRectIndex</a> = <a class="code" href="class_qwt_plot_zoomer.html#a139406bf61ed7f32a4c114e1ae4affff">zoomStack</a>.count() - 1;</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160; </div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">bool</span> doRescale = <a class="code" href="class_qwt_plot_zoomer.html#a139406bf61ed7f32a4c114e1ae4affff">zoomStack</a>[<a class="code" href="class_qwt_plot_zoomer.html#ab2a8af282a7052976e9c18b2d0c59db9">zoomRectIndex</a>] != <a class="code" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">zoomRect</a>();</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160; </div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;    m_data-&gt;zoomStack = <a class="code" href="class_qwt_plot_zoomer.html#a139406bf61ed7f32a4c114e1ae4affff">zoomStack</a>;</div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;    m_data-&gt;zoomRectIndex = uint( <a class="code" href="class_qwt_plot_zoomer.html#ab2a8af282a7052976e9c18b2d0c59db9">zoomRectIndex</a> );</div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160; </div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;    <span class="keywordflow">if</span> ( doRescale )</div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;    {</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;        <a class="code" href="class_qwt_plot_zoomer.html#a0d0f90bbd5fe99d5231b3cee00fffabe">rescale</a>();</div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;        Q_EMIT <a class="code" href="class_qwt_plot_zoomer.html#af5d312de34b493b59e48f03850478648">zoomed</a>( <a class="code" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">zoomRect</a>() );</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;    }</div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;}</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160; </div>
<div class="line"><a name="l00416"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#a0d0f90bbd5fe99d5231b3cee00fffabe">  416</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_zoomer.html#a0d0f90bbd5fe99d5231b3cee00fffabe">QwtPlotZoomer::rescale</a>()</div>
<div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;{</div>
<div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;    <a class="code" href="class_qwt_plot.html">QwtPlot</a>* plt = <a class="code" href="class_qwt_plot_picker.html#ac5906d5fe7543f3db7808da44d8197a9">plot</a>();</div>
<div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;    <span class="keywordflow">if</span> ( !plt )</div>
<div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160; </div>
<div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;    <span class="keyword">const</span> QRectF&amp; rect = m_data-&gt;zoomStack[m_data-&gt;zoomRectIndex];</div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;    <span class="keywordflow">if</span> ( rect != <a class="code" href="class_qwt_plot_picker.html#ac15a71b19aca88fa850298975ec18eee">scaleRect</a>() )</div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;    {</div>
<div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">bool</span> doReplot = plt-&gt;<a class="code" href="class_qwt_plot.html#a3a639850b65bc4dbf22b3f3170d61804">autoReplot</a>();</div>
<div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;        plt-&gt;<a class="code" href="class_qwt_plot.html#ab1cbce6d43ff9772735a9df9104f882f">setAutoReplot</a>( <span class="keyword">false</span> );</div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160; </div>
<div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;        <span class="keywordtype">double</span> x1 = rect.left();</div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;        <span class="keywordtype">double</span> x2 = rect.right();</div>
<div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;        <span class="keywordflow">if</span> ( !plt-&gt;<a class="code" href="class_qwt_plot.html#aec95c5a35fdd1ef000093d44337c9210">axisScaleDiv</a>( <a class="code" href="class_qwt_plot_picker.html#a6668e12f289ff1cda732b6569a61aae5">xAxis</a>() ).isIncreasing() )</div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;            qSwap( x1, x2 );</div>
<div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160; </div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;        plt-&gt;<a class="code" href="class_qwt_plot.html#a2b4ceb9580da690d2e6762cd460c4673">setAxisScale</a>( <a class="code" href="class_qwt_plot_picker.html#a6668e12f289ff1cda732b6569a61aae5">xAxis</a>(), x1, x2 );</div>
<div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160; </div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;        <span class="keywordtype">double</span> y1 = rect.top();</div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;        <span class="keywordtype">double</span> y2 = rect.bottom();</div>
<div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;        <span class="keywordflow">if</span> ( !plt-&gt;<a class="code" href="class_qwt_plot.html#aec95c5a35fdd1ef000093d44337c9210">axisScaleDiv</a>( <a class="code" href="class_qwt_plot_picker.html#a49b165c97d3e638dc2ca9053454088cb">yAxis</a>() ).isIncreasing() )</div>
<div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;            qSwap( y1, y2 );</div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160; </div>
<div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;        plt-&gt;<a class="code" href="class_qwt_plot.html#a2b4ceb9580da690d2e6762cd460c4673">setAxisScale</a>( <a class="code" href="class_qwt_plot_picker.html#a49b165c97d3e638dc2ca9053454088cb">yAxis</a>(), y1, y2 );</div>
<div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160; </div>
<div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;        plt-&gt;<a class="code" href="class_qwt_plot.html#ab1cbce6d43ff9772735a9df9104f882f">setAutoReplot</a>( doReplot );</div>
<div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160; </div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;        plt-&gt;<a class="code" href="class_qwt_plot.html#a7b094e29b8e92b00e36517d0d7633c4b">replot</a>();</div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;    }</div>
<div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;}</div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160; </div>
<div class="line"><a name="l00455"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#aa8a1f3985cd8bc53586ef5a04aaef600">  455</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_zoomer.html#aa8a1f3985cd8bc53586ef5a04aaef600">QwtPlotZoomer::setAxes</a>( QwtAxisId xAxisId, QwtAxisId yAxisId )</div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;{</div>
<div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;    <span class="keywordflow">if</span> ( xAxisId != <a class="code" href="class_qwt_plot_picker.html#a6668e12f289ff1cda732b6569a61aae5">QwtPlotPicker::xAxis</a>() || yAxisId != <a class="code" href="class_qwt_plot_picker.html#a49b165c97d3e638dc2ca9053454088cb">QwtPlotPicker::yAxis</a>() )</div>
<div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;    {</div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;        <a class="code" href="class_qwt_plot_picker.html#a6e70b987ac087bd46f35adaece356f73">QwtPlotPicker::setAxes</a>( xAxisId, yAxisId );</div>
<div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;        <a class="code" href="class_qwt_plot_zoomer.html#a7ee4f2a0606df6e85258c52f0b5c7bc2">setZoomBase</a>( <a class="code" href="class_qwt_plot_picker.html#ac15a71b19aca88fa850298975ec18eee">scaleRect</a>() );</div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;    }</div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;}</div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160; </div>
<div class="line"><a name="l00474"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#a6f4bbc4bd478643e5cf16f25aeb55695">  474</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_zoomer.html#a6f4bbc4bd478643e5cf16f25aeb55695">QwtPlotZoomer::widgetMouseReleaseEvent</a>( QMouseEvent* me )</div>
<div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;{</div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;    <span class="keywordflow">if</span> ( <a class="code" href="class_qwt_event_pattern.html#a3746870b5a06dfa3bfc15c51fed79138">mouseMatch</a>( <a class="code" href="class_qwt_event_pattern.html#af48dc808ac5e125eeed41a4c0285d1eaac4185682db6cfd9c59955eb4cf052fd1">MouseSelect2</a>, me ) )</div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;        <a class="code" href="class_qwt_plot_zoomer.html#afe9f123f263536b620d1a9061d5705c6">zoom</a>( 0 );</div>
<div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="class_qwt_event_pattern.html#a3746870b5a06dfa3bfc15c51fed79138">mouseMatch</a>( <a class="code" href="class_qwt_event_pattern.html#af48dc808ac5e125eeed41a4c0285d1eaaa52e3aa1f4f6e57e22ffe9208f0dd1e3">MouseSelect3</a>, me ) )</div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;        <a class="code" href="class_qwt_plot_zoomer.html#afe9f123f263536b620d1a9061d5705c6">zoom</a>( -1 );</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="class_qwt_event_pattern.html#a3746870b5a06dfa3bfc15c51fed79138">mouseMatch</a>( <a class="code" href="class_qwt_event_pattern.html#af48dc808ac5e125eeed41a4c0285d1eaaf8f83e3d9c9a5d639a4290c6b124ddd9">MouseSelect6</a>, me ) )</div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;        <a class="code" href="class_qwt_plot_zoomer.html#afe9f123f263536b620d1a9061d5705c6">zoom</a>( +1 );</div>
<div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;        <a class="code" href="class_qwt_picker.html#ac009633e005b6290e07b902f2a58e45e">QwtPlotPicker::widgetMouseReleaseEvent</a>( me );</div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;}</div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160; </div>
<div class="line"><a name="l00497"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#a064be63066b92a76aee6ef19488ec778">  497</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_zoomer.html#a064be63066b92a76aee6ef19488ec778">QwtPlotZoomer::widgetKeyPressEvent</a>( QKeyEvent* ke )</div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;{</div>
<div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;    <span class="keywordflow">if</span> ( !<a class="code" href="class_qwt_picker.html#a9ee030f985edfa20d0f896534b9b611b">isActive</a>() )</div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;    {</div>
<div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;        <span class="keywordflow">if</span> ( <a class="code" href="class_qwt_event_pattern.html#a737a72838595ae3a99779f2254abcfc8">keyMatch</a>( <a class="code" href="class_qwt_event_pattern.html#a8fb57ceb9982d5583a1bf568e37d3007a76cf851373169fbc588109c1eccca33a">KeyUndo</a>, ke ) )</div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;            <a class="code" href="class_qwt_plot_zoomer.html#afe9f123f263536b620d1a9061d5705c6">zoom</a>( -1 );</div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="class_qwt_event_pattern.html#a737a72838595ae3a99779f2254abcfc8">keyMatch</a>( <a class="code" href="class_qwt_event_pattern.html#a8fb57ceb9982d5583a1bf568e37d3007a2c8d72876cd9435ee018e9cf8fa2ff26">KeyRedo</a>, ke ) )</div>
<div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;            <a class="code" href="class_qwt_plot_zoomer.html#afe9f123f263536b620d1a9061d5705c6">zoom</a>( +1 );</div>
<div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="class_qwt_event_pattern.html#a737a72838595ae3a99779f2254abcfc8">keyMatch</a>( <a class="code" href="class_qwt_event_pattern.html#a8fb57ceb9982d5583a1bf568e37d3007a4cba7de2850f874988cbaa38a236ecb2">KeyHome</a>, ke ) )</div>
<div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;            <a class="code" href="class_qwt_plot_zoomer.html#afe9f123f263536b620d1a9061d5705c6">zoom</a>( 0 );</div>
<div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;    }</div>
<div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160; </div>
<div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;    <a class="code" href="class_qwt_picker.html#af5bc441b2fc143363563922a3b3c70ae">QwtPlotPicker::widgetKeyPressEvent</a>( ke );</div>
<div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;}</div>
<div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160; </div>
<div class="line"><a name="l00520"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#a0ad18ed63def6937d22275467c814085">  520</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_zoomer.html#a0ad18ed63def6937d22275467c814085">QwtPlotZoomer::moveBy</a>( <span class="keywordtype">double</span> dx, <span class="keywordtype">double</span> dy )</div>
<div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;{</div>
<div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;    <span class="keyword">const</span> QRectF&amp; rect = m_data-&gt;zoomStack[m_data-&gt;zoomRectIndex];</div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;    <a class="code" href="class_qwt_plot_zoomer.html#a40853271ba53bb66f9cf744ab69c1b13">moveTo</a>( QPointF( rect.left() + dx, rect.top() + dy ) );</div>
<div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;}</div>
<div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160; </div>
<div class="line"><a name="l00534"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#a40853271ba53bb66f9cf744ab69c1b13">  534</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_zoomer.html#a40853271ba53bb66f9cf744ab69c1b13">QwtPlotZoomer::moveTo</a>( <span class="keyword">const</span> QPointF&amp; pos )</div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;{</div>
<div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;    <span class="keywordtype">double</span> x = pos.x();</div>
<div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;    <span class="keywordtype">double</span> y = pos.y();</div>
<div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160; </div>
<div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;    <span class="keywordflow">if</span> ( x &lt; <a class="code" href="class_qwt_plot_zoomer.html#aa1e519a50f33f00f612e413cae3c0acc">zoomBase</a>().left() )</div>
<div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;        x = <a class="code" href="class_qwt_plot_zoomer.html#aa1e519a50f33f00f612e413cae3c0acc">zoomBase</a>().left();</div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;    <span class="keywordflow">if</span> ( x &gt; <a class="code" href="class_qwt_plot_zoomer.html#aa1e519a50f33f00f612e413cae3c0acc">zoomBase</a>().right() - <a class="code" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">zoomRect</a>().width() )</div>
<div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;        x = <a class="code" href="class_qwt_plot_zoomer.html#aa1e519a50f33f00f612e413cae3c0acc">zoomBase</a>().right() - <a class="code" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">zoomRect</a>().width();</div>
<div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160; </div>
<div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;    <span class="keywordflow">if</span> ( y &lt; <a class="code" href="class_qwt_plot_zoomer.html#aa1e519a50f33f00f612e413cae3c0acc">zoomBase</a>().top() )</div>
<div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;        y = <a class="code" href="class_qwt_plot_zoomer.html#aa1e519a50f33f00f612e413cae3c0acc">zoomBase</a>().top();</div>
<div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;    <span class="keywordflow">if</span> ( y &gt; <a class="code" href="class_qwt_plot_zoomer.html#aa1e519a50f33f00f612e413cae3c0acc">zoomBase</a>().bottom() - <a class="code" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">zoomRect</a>().height() )</div>
<div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;        y = <a class="code" href="class_qwt_plot_zoomer.html#aa1e519a50f33f00f612e413cae3c0acc">zoomBase</a>().bottom() - <a class="code" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">zoomRect</a>().height();</div>
<div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160; </div>
<div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;    <span class="keywordflow">if</span> ( x != <a class="code" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">zoomRect</a>().left() || y != <a class="code" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">zoomRect</a>().top() )</div>
<div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;    {</div>
<div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;        m_data-&gt;zoomStack[m_data-&gt;zoomRectIndex].moveTo( x, y );</div>
<div class="line"><a name="l00552"></a><span class="lineno">  552</span>&#160;        <a class="code" href="class_qwt_plot_zoomer.html#a0d0f90bbd5fe99d5231b3cee00fffabe">rescale</a>();</div>
<div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;    }</div>
<div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;}</div>
<div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160; </div>
<div class="line"><a name="l00567"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#abaf8d35d4e84cff6165cbebcdcf07787">  567</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_qwt_plot_zoomer.html#abaf8d35d4e84cff6165cbebcdcf07787">QwtPlotZoomer::accept</a>( QPolygon&amp; pa )<span class="keyword"> const</span></div>
<div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;    <span class="keywordflow">if</span> ( pa.count() &lt; 2 )</div>
<div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160; </div>
<div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;    QRect rect = QRect( pa.first(), pa.last() );</div>
<div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;    rect = rect.normalized();</div>
<div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160; </div>
<div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">int</span> minSize = 2;</div>
<div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;    <span class="keywordflow">if</span> ( rect.width() &lt; minSize &amp;&amp; rect.height() &lt; minSize )</div>
<div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160; </div>
<div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="class_qwt_plot_zoomer.html#af30a2dcfb755197ab0e9a0ee4bb309ff">minZoomSize</a> = 11;</div>
<div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160; </div>
<div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160;    <span class="keyword">const</span> QPoint center = rect.center();</div>
<div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;    rect.setSize( rect.size().expandedTo( QSize( <a class="code" href="class_qwt_plot_zoomer.html#af30a2dcfb755197ab0e9a0ee4bb309ff">minZoomSize</a>, <a class="code" href="class_qwt_plot_zoomer.html#af30a2dcfb755197ab0e9a0ee4bb309ff">minZoomSize</a> ) ) );</div>
<div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;    rect.moveCenter( center );</div>
<div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160; </div>
<div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;    pa.resize( 2 );</div>
<div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;    pa[0] = rect.topLeft();</div>
<div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;    pa[1] = rect.bottomRight();</div>
<div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160; </div>
<div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;}</div>
<div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160; </div>
<div class="line"><a name="l00597"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#af30a2dcfb755197ab0e9a0ee4bb309ff">  597</a></span>&#160;QSizeF <a class="code" href="class_qwt_plot_zoomer.html#af30a2dcfb755197ab0e9a0ee4bb309ff">QwtPlotZoomer::minZoomSize</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;    <span class="keywordflow">return</span> QSizeF( m_data-&gt;zoomStack[0].width() / 10e4,</div>
<div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;        m_data-&gt;zoomStack[0].height() / 10e4 );</div>
<div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;}</div>
<div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160; </div>
<div class="line"><a name="l00609"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#a9de8c0837c7a65d5e9f4e25e904f9d82">  609</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_zoomer.html#a9de8c0837c7a65d5e9f4e25e904f9d82">QwtPlotZoomer::begin</a>()</div>
<div class="line"><a name="l00610"></a><span class="lineno">  610</span>&#160;{</div>
<div class="line"><a name="l00611"></a><span class="lineno">  611</span>&#160;    <span class="keywordflow">if</span> ( m_data-&gt;maxStackDepth &gt;= 0 )</div>
<div class="line"><a name="l00612"></a><span class="lineno">  612</span>&#160;    {</div>
<div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;        <span class="keywordflow">if</span> ( m_data-&gt;zoomRectIndex &gt;= uint( m_data-&gt;maxStackDepth ) )</div>
<div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;    }</div>
<div class="line"><a name="l00616"></a><span class="lineno">  616</span>&#160; </div>
<div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;    <span class="keyword">const</span> QSizeF minSize = <a class="code" href="class_qwt_plot_zoomer.html#af30a2dcfb755197ab0e9a0ee4bb309ff">minZoomSize</a>();</div>
<div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;    <span class="keywordflow">if</span> ( minSize.isValid() )</div>
<div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160;    {</div>
<div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160;        <span class="keyword">const</span> QSizeF sz =</div>
<div class="line"><a name="l00621"></a><span class="lineno">  621</span>&#160;            m_data-&gt;zoomStack[m_data-&gt;zoomRectIndex].size() * 0.9999;</div>
<div class="line"><a name="l00622"></a><span class="lineno">  622</span>&#160; </div>
<div class="line"><a name="l00623"></a><span class="lineno">  623</span>&#160;        <span class="keywordflow">if</span> ( minSize.width() &gt;= sz.width() &amp;&amp;</div>
<div class="line"><a name="l00624"></a><span class="lineno">  624</span>&#160;            minSize.height() &gt;= sz.height() )</div>
<div class="line"><a name="l00625"></a><span class="lineno">  625</span>&#160;        {</div>
<div class="line"><a name="l00626"></a><span class="lineno">  626</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00627"></a><span class="lineno">  627</span>&#160;        }</div>
<div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;    }</div>
<div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160; </div>
<div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;    <a class="code" href="class_qwt_picker.html#a49cb19aea451e275c5d376235e5a1d83">QwtPlotPicker::begin</a>();</div>
<div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160;}</div>
<div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160; </div>
<div class="line"><a name="l00643"></a><span class="lineno"><a class="line" href="class_qwt_plot_zoomer.html#ada9b33b017533709f335a89e8595d8b4">  643</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_qwt_plot_zoomer.html#ada9b33b017533709f335a89e8595d8b4">QwtPlotZoomer::end</a>( <span class="keywordtype">bool</span> ok )</div>
<div class="line"><a name="l00644"></a><span class="lineno">  644</span>&#160;{</div>
<div class="line"><a name="l00645"></a><span class="lineno">  645</span>&#160;    ok = <a class="code" href="class_qwt_plot_picker.html#a21ee9a1a9b860837ce9b7f5f8bb06d32">QwtPlotPicker::end</a>( ok );</div>
<div class="line"><a name="l00646"></a><span class="lineno">  646</span>&#160;    <span class="keywordflow">if</span> ( !ok )</div>
<div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00648"></a><span class="lineno">  648</span>&#160; </div>
<div class="line"><a name="l00649"></a><span class="lineno">  649</span>&#160;    <a class="code" href="class_qwt_plot.html">QwtPlot</a>* <a class="code" href="class_qwt_plot_picker.html#ac5906d5fe7543f3db7808da44d8197a9">plot</a> = <a class="code" href="class_qwt_plot_picker.html#ac5906d5fe7543f3db7808da44d8197a9">QwtPlotZoomer::plot</a>();</div>
<div class="line"><a name="l00650"></a><span class="lineno">  650</span>&#160;    <span class="keywordflow">if</span> ( !<a class="code" href="class_qwt_plot_picker.html#ac5906d5fe7543f3db7808da44d8197a9">plot</a> )</div>
<div class="line"><a name="l00651"></a><span class="lineno">  651</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00652"></a><span class="lineno">  652</span>&#160; </div>
<div class="line"><a name="l00653"></a><span class="lineno">  653</span>&#160;    <span class="keyword">const</span> QPolygon&amp; pa = <a class="code" href="class_qwt_picker.html#afd68f9e99ed124186418e54dd995a893">selection</a>();</div>
<div class="line"><a name="l00654"></a><span class="lineno">  654</span>&#160;    <span class="keywordflow">if</span> ( pa.count() &lt; 2 )</div>
<div class="line"><a name="l00655"></a><span class="lineno">  655</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00656"></a><span class="lineno">  656</span>&#160; </div>
<div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160;    QRect rect = QRect( pa.first(), pa.last() );</div>
<div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;    rect = rect.normalized();</div>
<div class="line"><a name="l00659"></a><span class="lineno">  659</span>&#160; </div>
<div class="line"><a name="l00660"></a><span class="lineno">  660</span>&#160;    <span class="keyword">const</span> <a class="code" href="class_qwt_scale_map.html">QwtScaleMap</a> xMap = <a class="code" href="class_qwt_plot_picker.html#ac5906d5fe7543f3db7808da44d8197a9">plot</a>-&gt;<a class="code" href="class_qwt_plot.html#ac68a48e1fbd79355c82bbbf3a1e19e93">canvasMap</a>( <a class="code" href="class_qwt_plot_picker.html#a6668e12f289ff1cda732b6569a61aae5">xAxis</a>() );</div>
<div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;    <span class="keyword">const</span> <a class="code" href="class_qwt_scale_map.html">QwtScaleMap</a> yMap = <a class="code" href="class_qwt_plot_picker.html#ac5906d5fe7543f3db7808da44d8197a9">plot</a>-&gt;<a class="code" href="class_qwt_plot.html#ac68a48e1fbd79355c82bbbf3a1e19e93">canvasMap</a>( <a class="code" href="class_qwt_plot_picker.html#a49b165c97d3e638dc2ca9053454088cb">yAxis</a>() );</div>
<div class="line"><a name="l00662"></a><span class="lineno">  662</span>&#160; </div>
<div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;    QRectF <a class="code" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">zoomRect</a> = <a class="code" href="class_qwt_scale_map.html#ab1ee6d62addf3f9cf091d425be9ac642">QwtScaleMap::invTransform</a>( xMap, yMap, rect ).normalized();</div>
<div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160; </div>
<div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;    <a class="code" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">zoomRect</a> = qwtExpandedZoomRect( <a class="code" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">zoomRect</a>, <a class="code" href="class_qwt_plot_zoomer.html#af30a2dcfb755197ab0e9a0ee4bb309ff">minZoomSize</a>(),</div>
<div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;        xMap.<a class="code" href="class_qwt_scale_map.html#a810c561caaad7d6573a1e8ff06fe4b23">transformation</a>(), yMap.<a class="code" href="class_qwt_scale_map.html#a810c561caaad7d6573a1e8ff06fe4b23">transformation</a>() );</div>
<div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160; </div>
<div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;    <a class="code" href="class_qwt_plot_zoomer.html#afe9f123f263536b620d1a9061d5705c6">zoom</a>( <a class="code" href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">zoomRect</a> );</div>
<div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160; </div>
<div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;}</div>
<div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160; </div>
<div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;<span class="preprocessor">#if QWT_MOC_INCLUDE</span></div>
<div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;<span class="preprocessor">#include &quot;moc_qwt_plot_zoomer.cpp&quot;</span></div>
<div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclass_q_stack_html"><div class="ttname"><a href="class_q_stack.html">QStack&lt; QRectF &gt;</a></div></div>
<div class="ttc" id="aclass_qwt_event_pattern_html_a3746870b5a06dfa3bfc15c51fed79138"><div class="ttname"><a href="class_qwt_event_pattern.html#a3746870b5a06dfa3bfc15c51fed79138">QwtEventPattern::mouseMatch</a></div><div class="ttdeci">bool mouseMatch(MousePatternCode, const QMouseEvent *) const</div><div class="ttdoc">Compare a mouse event with an event pattern.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__event__pattern_8cpp_source.html#l00188">qwt_event_pattern.cpp:188</a></div></div>
<div class="ttc" id="aclass_qwt_event_pattern_html_a737a72838595ae3a99779f2254abcfc8"><div class="ttname"><a href="class_qwt_event_pattern.html#a737a72838595ae3a99779f2254abcfc8">QwtEventPattern::keyMatch</a></div><div class="ttdeci">bool keyMatch(KeyPatternCode, const QKeyEvent *) const</div><div class="ttdoc">Compare a key event with an event pattern.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__event__pattern_8cpp_source.html#l00234">qwt_event_pattern.cpp:234</a></div></div>
<div class="ttc" id="aclass_qwt_event_pattern_html_a8fb57ceb9982d5583a1bf568e37d3007a2c8d72876cd9435ee018e9cf8fa2ff26"><div class="ttname"><a href="class_qwt_event_pattern.html#a8fb57ceb9982d5583a1bf568e37d3007a2c8d72876cd9435ee018e9cf8fa2ff26">QwtEventPattern::KeyRedo</a></div><div class="ttdeci">@ KeyRedo</div><div class="ttdoc">Qt::Key_Plus.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__event__pattern_8h_source.html#l00136">qwt_event_pattern.h:136</a></div></div>
<div class="ttc" id="aclass_qwt_event_pattern_html_a8fb57ceb9982d5583a1bf568e37d3007a4cba7de2850f874988cbaa38a236ecb2"><div class="ttname"><a href="class_qwt_event_pattern.html#a8fb57ceb9982d5583a1bf568e37d3007a4cba7de2850f874988cbaa38a236ecb2">QwtEventPattern::KeyHome</a></div><div class="ttdeci">@ KeyHome</div><div class="ttdoc">Qt::Key_Escape.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__event__pattern_8h_source.html#l00142">qwt_event_pattern.h:142</a></div></div>
<div class="ttc" id="aclass_qwt_event_pattern_html_a8fb57ceb9982d5583a1bf568e37d3007a76cf851373169fbc588109c1eccca33a"><div class="ttname"><a href="class_qwt_event_pattern.html#a8fb57ceb9982d5583a1bf568e37d3007a76cf851373169fbc588109c1eccca33a">QwtEventPattern::KeyUndo</a></div><div class="ttdeci">@ KeyUndo</div><div class="ttdoc">Qt::Key_Minus.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__event__pattern_8h_source.html#l00139">qwt_event_pattern.h:139</a></div></div>
<div class="ttc" id="aclass_qwt_event_pattern_html_af48dc808ac5e125eeed41a4c0285d1eaaa52e3aa1f4f6e57e22ffe9208f0dd1e3"><div class="ttname"><a href="class_qwt_event_pattern.html#af48dc808ac5e125eeed41a4c0285d1eaaa52e3aa1f4f6e57e22ffe9208f0dd1e3">QwtEventPattern::MouseSelect3</a></div><div class="ttdeci">@ MouseSelect3</div><div class="ttdef"><b>Definition:</b> <a href="qwt__event__pattern_8h_source.html#l00072">qwt_event_pattern.h:72</a></div></div>
<div class="ttc" id="aclass_qwt_event_pattern_html_af48dc808ac5e125eeed41a4c0285d1eaac4185682db6cfd9c59955eb4cf052fd1"><div class="ttname"><a href="class_qwt_event_pattern.html#af48dc808ac5e125eeed41a4c0285d1eaac4185682db6cfd9c59955eb4cf052fd1">QwtEventPattern::MouseSelect2</a></div><div class="ttdeci">@ MouseSelect2</div><div class="ttdef"><b>Definition:</b> <a href="qwt__event__pattern_8h_source.html#l00063">qwt_event_pattern.h:63</a></div></div>
<div class="ttc" id="aclass_qwt_event_pattern_html_af48dc808ac5e125eeed41a4c0285d1eaaf8f83e3d9c9a5d639a4290c6b124ddd9"><div class="ttname"><a href="class_qwt_event_pattern.html#af48dc808ac5e125eeed41a4c0285d1eaaf8f83e3d9c9a5d639a4290c6b124ddd9">QwtEventPattern::MouseSelect6</a></div><div class="ttdeci">@ MouseSelect6</div><div class="ttdef"><b>Definition:</b> <a href="qwt__event__pattern_8h_source.html#l00099">qwt_event_pattern.h:99</a></div></div>
<div class="ttc" id="aclass_qwt_interval_html"><div class="ttname"><a href="class_qwt_interval.html">QwtInterval</a></div><div class="ttdoc">A class representing an interval.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__interval_8h_source.html#l00022">qwt_interval.h:23</a></div></div>
<div class="ttc" id="aclass_qwt_interval_html_a0df143a36d76a677976d82987cab8a06"><div class="ttname"><a href="class_qwt_interval.html#a0df143a36d76a677976d82987cab8a06">QwtInterval::minValue</a></div><div class="ttdeci">double minValue() const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__interval_8h_source.html#l00192">qwt_interval.h:192</a></div></div>
<div class="ttc" id="aclass_qwt_interval_html_a44820fa5d6e6cefa59dc31ea0d522d61"><div class="ttname"><a href="class_qwt_interval.html#a44820fa5d6e6cefa59dc31ea0d522d61">QwtInterval::maxValue</a></div><div class="ttdeci">double maxValue() const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__interval_8h_source.html#l00198">qwt_interval.h:198</a></div></div>
<div class="ttc" id="aclass_qwt_picker_drag_rect_machine_html"><div class="ttname"><a href="class_qwt_picker_drag_rect_machine.html">QwtPickerDragRectMachine</a></div><div class="ttdoc">A state machine for rectangle selections.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__picker__machine_8h_source.html#l00161">qwt_picker_machine.h:162</a></div></div>
<div class="ttc" id="aclass_qwt_picker_html_a01be4d404ffc3a7b238b0d0aaeb66b93a973f3446b39ea41b5dc3b31593ecb64a"><div class="ttname"><a href="class_qwt_picker.html#a01be4d404ffc3a7b238b0d0aaeb66b93a973f3446b39ea41b5dc3b31593ecb64a">QwtPicker::ActiveOnly</a></div><div class="ttdeci">@ ActiveOnly</div><div class="ttdoc">Display only when the selection is active.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__picker_8h_source.html#l00171">qwt_picker.h:170</a></div></div>
<div class="ttc" id="aclass_qwt_picker_html_a49cb19aea451e275c5d376235e5a1d83"><div class="ttname"><a href="class_qwt_picker.html#a49cb19aea451e275c5d376235e5a1d83">QwtPicker::begin</a></div><div class="ttdeci">virtual void begin()</div><div class="ttdef"><b>Definition:</b> <a href="qwt__picker_8cpp_source.html#l01239">qwt_picker.cpp:1239</a></div></div>
<div class="ttc" id="aclass_qwt_picker_html_a5ff72a5658631bcad3857ca5cfd3e6d9"><div class="ttname"><a href="class_qwt_picker.html#a5ff72a5658631bcad3857ca5cfd3e6d9">QwtPicker::setStateMachine</a></div><div class="ttdeci">void setStateMachine(QwtPickerMachine *)</div><div class="ttdef"><b>Definition:</b> <a href="qwt__picker_8cpp_source.html#l00229">qwt_picker.cpp:229</a></div></div>
<div class="ttc" id="aclass_qwt_picker_html_a83096bad2662e02e4914a7b40241c351"><div class="ttname"><a href="class_qwt_picker.html#a83096bad2662e02e4914a7b40241c351">QwtPicker::setRubberBand</a></div><div class="ttdeci">void setRubberBand(RubberBand)</div><div class="ttdef"><b>Definition:</b> <a href="qwt__picker_8cpp_source.html#l00289">qwt_picker.cpp:289</a></div></div>
<div class="ttc" id="aclass_qwt_picker_html_a94fc60c7223cdc470ae63156f6446d6f"><div class="ttname"><a href="class_qwt_picker.html#a94fc60c7223cdc470ae63156f6446d6f">QwtPicker::setTrackerMode</a></div><div class="ttdeci">void setTrackerMode(DisplayMode)</div><div class="ttdoc">Set the display mode of the tracker.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__picker_8cpp_source.html#l00319">qwt_picker.cpp:319</a></div></div>
<div class="ttc" id="aclass_qwt_picker_html_a9ee030f985edfa20d0f896534b9b611b"><div class="ttname"><a href="class_qwt_picker.html#a9ee030f985edfa20d0f896534b9b611b">QwtPicker::isActive</a></div><div class="ttdeci">bool isActive() const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__picker_8cpp_source.html#l01393">qwt_picker.cpp:1393</a></div></div>
<div class="ttc" id="aclass_qwt_picker_html_ab36c79d8ff20aba5b778d2823c1f7894ae4dc32fb99b4fe2058bb594ab5e8c70a"><div class="ttname"><a href="class_qwt_picker.html#ab36c79d8ff20aba5b778d2823c1f7894ae4dc32fb99b4fe2058bb594ab5e8c70a">QwtPicker::RectRubberBand</a></div><div class="ttdeci">@ RectRubberBand</div><div class="ttdoc">A rectangle ( only for QwtPickerMachine::RectSelection )</div><div class="ttdef"><b>Definition:</b> <a href="qwt__picker_8h_source.html#l00142">qwt_picker.h:142</a></div></div>
<div class="ttc" id="aclass_qwt_picker_html_ac009633e005b6290e07b902f2a58e45e"><div class="ttname"><a href="class_qwt_picker.html#ac009633e005b6290e07b902f2a58e45e">QwtPicker::widgetMouseReleaseEvent</a></div><div class="ttdeci">virtual void widgetMouseReleaseEvent(QMouseEvent *)</div><div class="ttdef"><b>Definition:</b> <a href="qwt__picker_8cpp_source.html#l01050">qwt_picker.cpp:1050</a></div></div>
<div class="ttc" id="aclass_qwt_picker_html_af5bc441b2fc143363563922a3b3c70ae"><div class="ttname"><a href="class_qwt_picker.html#af5bc441b2fc143363563922a3b3c70ae">QwtPicker::widgetKeyPressEvent</a></div><div class="ttdeci">virtual void widgetKeyPressEvent(QKeyEvent *)</div><div class="ttdef"><b>Definition:</b> <a href="qwt__picker_8cpp_source.html#l01112">qwt_picker.cpp:1112</a></div></div>
<div class="ttc" id="aclass_qwt_picker_html_afd68f9e99ed124186418e54dd995a893"><div class="ttname"><a href="class_qwt_picker.html#afd68f9e99ed124186418e54dd995a893">QwtPicker::selection</a></div><div class="ttdeci">QPolygon selection() const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__picker_8cpp_source.html#l00792">qwt_picker.cpp:792</a></div></div>
<div class="ttc" id="aclass_qwt_plot_html"><div class="ttname"><a href="class_qwt_plot.html">QwtPlot</a></div><div class="ttdoc">A 2-D plotting widget.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot_8h_source.html#l00078">qwt_plot.h:79</a></div></div>
<div class="ttc" id="aclass_qwt_plot_html_a2b4ceb9580da690d2e6762cd460c4673"><div class="ttname"><a href="class_qwt_plot.html#a2b4ceb9580da690d2e6762cd460c4673">QwtPlot::setAxisScale</a></div><div class="ttdeci">void setAxisScale(QwtAxisId, double min, double max, double stepSize=0)</div><div class="ttdoc">Disable autoscaling and specify a fixed scale for a selected axis.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__axis_8cpp_source.html#l00473">qwt_plot_axis.cpp:473</a></div></div>
<div class="ttc" id="aclass_qwt_plot_html_a3a639850b65bc4dbf22b3f3170d61804"><div class="ttname"><a href="class_qwt_plot.html#a3a639850b65bc4dbf22b3f3170d61804">QwtPlot::autoReplot</a></div><div class="ttdeci">bool autoReplot() const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot_8cpp_source.html#l00319">qwt_plot.cpp:319</a></div></div>
<div class="ttc" id="aclass_qwt_plot_html_a7b094e29b8e92b00e36517d0d7633c4b"><div class="ttname"><a href="class_qwt_plot.html#a7b094e29b8e92b00e36517d0d7633c4b">QwtPlot::replot</a></div><div class="ttdeci">virtual void replot()</div><div class="ttdoc">Redraw the plot.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot_8cpp_source.html#l00545">qwt_plot.cpp:545</a></div></div>
<div class="ttc" id="aclass_qwt_plot_html_ab1cbce6d43ff9772735a9df9104f882f"><div class="ttname"><a href="class_qwt_plot.html#ab1cbce6d43ff9772735a9df9104f882f">QwtPlot::setAutoReplot</a></div><div class="ttdeci">void setAutoReplot(bool=true)</div><div class="ttdoc">Set or reset the autoReplot option.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot_8cpp_source.html#l00310">qwt_plot.cpp:310</a></div></div>
<div class="ttc" id="aclass_qwt_plot_html_ac68a48e1fbd79355c82bbbf3a1e19e93"><div class="ttname"><a href="class_qwt_plot.html#ac68a48e1fbd79355c82bbbf3a1e19e93">QwtPlot::canvasMap</a></div><div class="ttdeci">virtual QwtScaleMap canvasMap(QwtAxisId) const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot_8cpp_source.html#l00800">qwt_plot.cpp:800</a></div></div>
<div class="ttc" id="aclass_qwt_plot_html_aec95c5a35fdd1ef000093d44337c9210"><div class="ttname"><a href="class_qwt_plot.html#aec95c5a35fdd1ef000093d44337c9210">QwtPlot::axisScaleDiv</a></div><div class="ttdeci">const QwtScaleDiv &amp; axisScaleDiv(QwtAxisId) const</div><div class="ttdoc">Return the scale division of a specified axis.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__axis_8cpp_source.html#l00283">qwt_plot_axis.cpp:283</a></div></div>
<div class="ttc" id="aclass_qwt_plot_picker_html"><div class="ttname"><a href="class_qwt_plot_picker.html">QwtPlotPicker</a></div><div class="ttdoc">QwtPlotPicker provides selections on a plot canvas.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__picker_8h_source.html#l00033">qwt_plot_picker.h:34</a></div></div>
<div class="ttc" id="aclass_qwt_plot_picker_html_a21ee9a1a9b860837ce9b7f5f8bb06d32"><div class="ttname"><a href="class_qwt_plot_picker.html#a21ee9a1a9b860837ce9b7f5f8bb06d32">QwtPlotPicker::end</a></div><div class="ttdeci">virtual bool end(bool ok=true) override</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__picker_8cpp_source.html#l00280">qwt_plot_picker.cpp:280</a></div></div>
<div class="ttc" id="aclass_qwt_plot_picker_html_a49b165c97d3e638dc2ca9053454088cb"><div class="ttname"><a href="class_qwt_plot_picker.html#a49b165c97d3e638dc2ca9053454088cb">QwtPlotPicker::yAxis</a></div><div class="ttdeci">QwtAxisId yAxis() const</div><div class="ttdoc">Return y axis.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__picker_8cpp_source.html#l00192">qwt_plot_picker.cpp:192</a></div></div>
<div class="ttc" id="aclass_qwt_plot_picker_html_a6668e12f289ff1cda732b6569a61aae5"><div class="ttname"><a href="class_qwt_plot_picker.html#a6668e12f289ff1cda732b6569a61aae5">QwtPlotPicker::xAxis</a></div><div class="ttdeci">QwtAxisId xAxis() const</div><div class="ttdoc">Return x axis.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__picker_8cpp_source.html#l00186">qwt_plot_picker.cpp:186</a></div></div>
<div class="ttc" id="aclass_qwt_plot_picker_html_a6e70b987ac087bd46f35adaece356f73"><div class="ttname"><a href="class_qwt_plot_picker.html#a6e70b987ac087bd46f35adaece356f73">QwtPlotPicker::setAxes</a></div><div class="ttdeci">virtual void setAxes(QwtAxisId xAxisId, QwtAxisId yAxisId)</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__picker_8cpp_source.html#l00172">qwt_plot_picker.cpp:172</a></div></div>
<div class="ttc" id="aclass_qwt_plot_picker_html_ac15a71b19aca88fa850298975ec18eee"><div class="ttname"><a href="class_qwt_plot_picker.html#ac15a71b19aca88fa850298975ec18eee">QwtPlotPicker::scaleRect</a></div><div class="ttdeci">QRectF scaleRect() const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__picker_8cpp_source.html#l00149">qwt_plot_picker.cpp:149</a></div></div>
<div class="ttc" id="aclass_qwt_plot_picker_html_ac5906d5fe7543f3db7808da44d8197a9"><div class="ttname"><a href="class_qwt_plot_picker.html#ac5906d5fe7543f3db7808da44d8197a9">QwtPlotPicker::plot</a></div><div class="ttdeci">QwtPlot * plot()</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__picker_8cpp_source.html#l00126">qwt_plot_picker.cpp:126</a></div></div>
<div class="ttc" id="aclass_qwt_plot_picker_html_ad2a03a80f35826ed6256f039da2b4bf2"><div class="ttname"><a href="class_qwt_plot_picker.html#ad2a03a80f35826ed6256f039da2b4bf2">QwtPlotPicker::canvas</a></div><div class="ttdeci">QWidget * canvas()</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__picker_8cpp_source.html#l00114">qwt_plot_picker.cpp:114</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_a064be63066b92a76aee6ef19488ec778"><div class="ttname"><a href="class_qwt_plot_zoomer.html#a064be63066b92a76aee6ef19488ec778">QwtPlotZoomer::widgetKeyPressEvent</a></div><div class="ttdeci">virtual void widgetKeyPressEvent(QKeyEvent *) override</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00497">qwt_plot_zoomer.cpp:497</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_a0ad18ed63def6937d22275467c814085"><div class="ttname"><a href="class_qwt_plot_zoomer.html#a0ad18ed63def6937d22275467c814085">QwtPlotZoomer::moveBy</a></div><div class="ttdeci">void moveBy(double dx, double dy)</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00520">qwt_plot_zoomer.cpp:520</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_a0bbe3514658ee443c68e2efbaca26804"><div class="ttname"><a href="class_qwt_plot_zoomer.html#a0bbe3514658ee443c68e2efbaca26804">QwtPlotZoomer::zoomRect</a></div><div class="ttdeci">QRectF zoomRect() const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00287">qwt_plot_zoomer.cpp:287</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_a0d0f90bbd5fe99d5231b3cee00fffabe"><div class="ttname"><a href="class_qwt_plot_zoomer.html#a0d0f90bbd5fe99d5231b3cee00fffabe">QwtPlotZoomer::rescale</a></div><div class="ttdeci">virtual void rescale()</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00416">qwt_plot_zoomer.cpp:416</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_a139406bf61ed7f32a4c114e1ae4affff"><div class="ttname"><a href="class_qwt_plot_zoomer.html#a139406bf61ed7f32a4c114e1ae4affff">QwtPlotZoomer::zoomStack</a></div><div class="ttdeci">const QStack&lt; QRectF &gt; &amp; zoomStack() const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00212">qwt_plot_zoomer.cpp:212</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_a1f77745e104b4a6300ebf1c6c3412b7e"><div class="ttname"><a href="class_qwt_plot_zoomer.html#a1f77745e104b4a6300ebf1c6c3412b7e">QwtPlotZoomer::QwtPlotZoomer</a></div><div class="ttdeci">QwtPlotZoomer(QWidget *, bool doReplot=true)</div><div class="ttdoc">Create a zoomer for a plot canvas.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00109">qwt_plot_zoomer.cpp:109</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_a3965591944793790407ba91d6de3a882"><div class="ttname"><a href="class_qwt_plot_zoomer.html#a3965591944793790407ba91d6de3a882">QwtPlotZoomer::setMaxStackDepth</a></div><div class="ttdeci">void setMaxStackDepth(int)</div><div class="ttdoc">Limit the number of recursive zoom operations to depth.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00174">qwt_plot_zoomer.cpp:174</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_a40853271ba53bb66f9cf744ab69c1b13"><div class="ttname"><a href="class_qwt_plot_zoomer.html#a40853271ba53bb66f9cf744ab69c1b13">QwtPlotZoomer::moveTo</a></div><div class="ttdeci">virtual void moveTo(const QPointF &amp;)</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00534">qwt_plot_zoomer.cpp:534</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_a6f4bbc4bd478643e5cf16f25aeb55695"><div class="ttname"><a href="class_qwt_plot_zoomer.html#a6f4bbc4bd478643e5cf16f25aeb55695">QwtPlotZoomer::widgetMouseReleaseEvent</a></div><div class="ttdeci">virtual void widgetMouseReleaseEvent(QMouseEvent *) override</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00474">qwt_plot_zoomer.cpp:474</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_a7ee4f2a0606df6e85258c52f0b5c7bc2"><div class="ttname"><a href="class_qwt_plot_zoomer.html#a7ee4f2a0606df6e85258c52f0b5c7bc2">QwtPlotZoomer::setZoomBase</a></div><div class="ttdeci">virtual void setZoomBase(bool doReplot=true)</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00235">qwt_plot_zoomer.cpp:235</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_a9de8c0837c7a65d5e9f4e25e904f9d82"><div class="ttname"><a href="class_qwt_plot_zoomer.html#a9de8c0837c7a65d5e9f4e25e904f9d82">QwtPlotZoomer::begin</a></div><div class="ttdeci">virtual void begin() override</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00609">qwt_plot_zoomer.cpp:609</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_aa1e519a50f33f00f612e413cae3c0acc"><div class="ttname"><a href="class_qwt_plot_zoomer.html#aa1e519a50f33f00f612e413cae3c0acc">QwtPlotZoomer::zoomBase</a></div><div class="ttdeci">QRectF zoomBase() const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00221">qwt_plot_zoomer.cpp:221</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_aa8a1f3985cd8bc53586ef5a04aaef600"><div class="ttname"><a href="class_qwt_plot_zoomer.html#aa8a1f3985cd8bc53586ef5a04aaef600">QwtPlotZoomer::setAxes</a></div><div class="ttdeci">virtual void setAxes(QwtAxisId xAxis, QwtAxisId yAxis) override</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00455">qwt_plot_zoomer.cpp:455</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_ab2a8af282a7052976e9c18b2d0c59db9"><div class="ttname"><a href="class_qwt_plot_zoomer.html#ab2a8af282a7052976e9c18b2d0c59db9">QwtPlotZoomer::zoomRectIndex</a></div><div class="ttdeci">uint zoomRectIndex() const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00295">qwt_plot_zoomer.cpp:295</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_ab541148fa7d57b8102d3d70ab9daccc4"><div class="ttname"><a href="class_qwt_plot_zoomer.html#ab541148fa7d57b8102d3d70ab9daccc4">QwtPlotZoomer::maxStackDepth</a></div><div class="ttdeci">int maxStackDepth() const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00201">qwt_plot_zoomer.cpp:201</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_abaf8d35d4e84cff6165cbebcdcf07787"><div class="ttname"><a href="class_qwt_plot_zoomer.html#abaf8d35d4e84cff6165cbebcdcf07787">QwtPlotZoomer::accept</a></div><div class="ttdeci">virtual bool accept(QPolygon &amp;) const override</div><div class="ttdoc">Check and correct a selected rectangle.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00567">qwt_plot_zoomer.cpp:567</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_ada9b33b017533709f335a89e8595d8b4"><div class="ttname"><a href="class_qwt_plot_zoomer.html#ada9b33b017533709f335a89e8595d8b4">QwtPlotZoomer::end</a></div><div class="ttdeci">virtual bool end(bool ok=true) override</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00643">qwt_plot_zoomer.cpp:643</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_af30a2dcfb755197ab0e9a0ee4bb309ff"><div class="ttname"><a href="class_qwt_plot_zoomer.html#af30a2dcfb755197ab0e9a0ee4bb309ff">QwtPlotZoomer::minZoomSize</a></div><div class="ttdeci">virtual QSizeF minZoomSize() const</div><div class="ttdoc">Limit zooming by a minimum rectangle.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00597">qwt_plot_zoomer.cpp:597</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_af5d312de34b493b59e48f03850478648"><div class="ttname"><a href="class_qwt_plot_zoomer.html#af5d312de34b493b59e48f03850478648">QwtPlotZoomer::zoomed</a></div><div class="ttdeci">void zoomed(const QRectF &amp;rect)</div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_afc12a6e757768a71d1c74b90931bfc70"><div class="ttname"><a href="class_qwt_plot_zoomer.html#afc12a6e757768a71d1c74b90931bfc70">QwtPlotZoomer::setZoomStack</a></div><div class="ttdeci">void setZoomStack(const QStack&lt; QRectF &gt; &amp;, int zoomRectIndex=-1)</div><div class="ttdoc">Assign a zoom stack.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00383">qwt_plot_zoomer.cpp:383</a></div></div>
<div class="ttc" id="aclass_qwt_plot_zoomer_html_afe9f123f263536b620d1a9061d5705c6"><div class="ttname"><a href="class_qwt_plot_zoomer.html#afe9f123f263536b620d1a9061d5705c6">QwtPlotZoomer::zoom</a></div><div class="ttdeci">virtual void zoom(const QRectF &amp;)</div><div class="ttdoc">Zoom in.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__zoomer_8cpp_source.html#l00310">qwt_plot_zoomer.cpp:310</a></div></div>
<div class="ttc" id="aclass_qwt_scale_map_html"><div class="ttname"><a href="class_qwt_scale_map.html">QwtScaleMap</a></div><div class="ttdoc">A scale map.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__scale__map_8h_source.html#l00026">qwt_scale_map.h:27</a></div></div>
<div class="ttc" id="aclass_qwt_scale_map_html_a810c561caaad7d6573a1e8ff06fe4b23"><div class="ttname"><a href="class_qwt_scale_map.html#a810c561caaad7d6573a1e8ff06fe4b23">QwtScaleMap::transformation</a></div><div class="ttdeci">const QwtTransform * transformation() const</div><div class="ttdoc">Get the transformation.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__scale__map_8cpp_source.html#l00088">qwt_scale_map.cpp:88</a></div></div>
<div class="ttc" id="aclass_qwt_scale_map_html_ab1ee6d62addf3f9cf091d425be9ac642"><div class="ttname"><a href="class_qwt_scale_map.html#ab1ee6d62addf3f9cf091d425be9ac642">QwtScaleMap::invTransform</a></div><div class="ttdeci">double invTransform(double p) const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__scale__map_8h_source.html#l00154">qwt_scale_map.h:154</a></div></div>
<div class="ttc" id="aclass_qwt_transform_html"><div class="ttname"><a href="class_qwt_transform.html">QwtTransform</a></div><div class="ttdoc">A transformation between coordinate systems.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__transform_8h_source.html#l00035">qwt_transform.h:36</a></div></div>
<div class="ttc" id="aclass_qwt_transform_html_aef97acf17f900905f2a93cec7f61e643"><div class="ttname"><a href="class_qwt_transform.html#aef97acf17f900905f2a93cec7f61e643">QwtTransform::bounded</a></div><div class="ttdeci">virtual double bounded(double value) const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__transform_8cpp_source.html#l00033">qwt_transform.cpp:33</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><b>qwt_plot_zoomer.cpp</b></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
